1 <?php
2 error_reporting(
0);
3 if
(isset($_POST['submit']))
4 {
5 $fname=$_POST[
'fname'];
6 $mnumber=$_POST[
'mobilenumber'];
7 $email=$_POST[
'email'];
8 $password=md5($_POST[
'password']);
9 $sql=
"INSERT INTO tblusers(FullName,MobileNumber,EmailId,Password) VALUES(:fname,:mnumber,:email,:password)";
10 $query = $dbh->prepare($sql);
11 $query->bindParam(
':fname',$fname,PDO::PARAM_STR);
12 $query->bindParam(
':mnumber',$mnumber,PDO::PARAM_STR);
13 $query->bindParam(
':email',$email,PDO::PARAM_STR);
14 $query->bindParam(
':password',$password,PDO::PARAM_STR);
15 $query->execute();
16 $lastInsertId = $dbh->lastInsertId();

17 if
($lastInsertId)
18 {
19 $_SESSION[
'msg']="You are Scuccessfully registered. Now you can login ";
20 header(
'location:thankyou.php');
21 }

22 else

23 {
24 $_SESSION[
'msg']="Something went wrong. Please try again.";
25 header(
'location:thankyou.php');
26 }
27 }
28 ?>
29 <!--Javascript
for check email availabilty-->
30 <script>
31 function checkAvailability() {
32
33 $(
"#loaderIcon").show();
34 jQuery.ajax({
35 url:
"check_availability.php",
36 data:
'emailid='+$("#email").val(),
37 type:
"POST",
38 success:function(data){
39 $(
"#user-availability-status").html(data);
40 $(
"#loaderIcon").hide();
41 },
42 error:function (){}
43 });
44 }
45 </script>
46
47 <div
class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
48                 <div
class="modal-dialog" role="document">
49                     <div
class="modal-content">
50                         <div
class="modal-header">
51                             <button type=
"button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
52                         </div>
53                             <section>
54                                 <div
class="modal-body modal-spa">
55                                     <div
class="login-grids">
56                                         <div
class="login">
57                                             <div
class="login-left">
58                                                 <ul>
59                                                     <li><a
class="fb" href="#"><i></i>Facebook</a></li>
60                                                     <li><a
class="goog" href="#"><i></i>Google</a></li>
61                                                     
62                                                 </ul>
63                                             </div>
64                                             <div
class="login-right">
65                                                 <form name=
"signup" method="post">
66                                                     <h3>Create your account </h3>
67                     
68
69                 <input type=
"text" value="" placeholder="Full Name" name="fname" autocomplete="off" required="">
70                 <input type=
"text" value="" placeholder="Mobile number" maxlength="10" name="mobilenumber" autocomplete="off" required="">
71         <input type=
"text" value="" placeholder="Email id" name="email" id="email" onBlur="checkAvailability()" autocomplete="off" required="">
72          <span id=
"user-availability-status" style="font-size:12px;"></span>
73     <input type=
"password" value="" placeholder="Password" name="password" required="">
74                                                     <input type=
"submit" name="submit" id="submit" value="CREATE ACCOUNT">
75                                                 </form>
76                                             </div>
77                                                 <div
class="clearfix"></div>
78                                         </div>
79                                             <p>By logging
in you agree to our <a href="page.php?type=terms">Terms and Conditions</a> and <a href="page.php?type=privacy">Privacy Policy</a></p>
80                                     </div>
81                                 </div>
82                             </section>
83                     </div>
84                 </div>
85             </div>


Gõ tìm kiếm nhanh...